package com.start.workflow.vo;

import com.alibaba.fastjson2.JSONObject;
import com.start.workflow.entity.StartActCategory;
import com.start.workflow.model.StartProcessModel;
import lombok.Data;

import java.util.List;

@Data
public class StartActCategoryModes extends StartActCategory {
    private List<StartProcessModel> models;


    public static StartActCategoryModes create(StartActCategory modelCategory) {
        return ((JSONObject) JSONObject.from(modelCategory)).toJavaObject(StartActCategoryModes.class);
    }

    public static StartActCategoryModes create(StartActCategory modelCategory, List<StartProcessModel> models) {
        StartActCategoryModes startActCategoryModes = create(modelCategory);
        startActCategoryModes.setModels(models);
        return startActCategoryModes;
    }
}
